package com.scholarship.modules.admin.mapper;

import com.scholarship.modules.admin.dto.RewardTypeDetailDto;
import com.scholarship.modules.admin.entity.RewardTypeDetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author Z.J.H
 * @create 2021/9/5 15:04
 */
@Repository
public interface ARewardTypeDetailMapper {
    /**
     * 查询奖项简称对应的奖项id
     *
     * @param tableName
     * @return
     * @throws Exception
     */
    Integer getIdByTableName(@Param("tableName") String tableName) throws Exception;

    /**
     * 根据奖项id获取奖项信息
     *
     * @param tableId
     * @return
     * @throws Exception
     */
    RewardTypeDetail getRewardTypeDetailByTableId(@Param("tableId") Integer tableId) throws Exception;

    /**
     * 获取全部奖项信息列表
     * @return
     * @throws Exception
     */
    List<RewardTypeDetail> listRewardTypeDetail() throws Exception;

    /**
     * 获根据奖学金类型id取奖项列表
     * @param typeId
     * @return
     */
    List<RewardTypeDetailDto> listRewardTypeDetailDtoByTypeId(@Param("typeId") Integer typeId);


}
